<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core"  
    xmlns:p="http://primefaces.org/ui"
     xmlns:ui="http://java.sun.com/jsf/facelets">    
  
    <h:head> 
    	<f:facet name="first">
            <meta http-equiv="X-UA-Compatible" content="EmulateIE8" />
            <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
            <title>Locadora - Graph</title>
        </f:facet>
 
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/telaInicial.css" /> 
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/cadastroFilme.css" /> 
         <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/cube.css" /> 
    	
    </h:head>  
      
    <h:body style="background:black;">
  	 	
    <p:layout fullPage="true">  
    <p:ajax event="toggle"  />  
    <p:ajax event="close"  />  
  
    <p:layoutUnit position="north" size="100"  resizable="true" closable="false" collapsible="false" style="overflow:hidden;min-width:400px;min-height:150px;">  
     
       <h:form> 
         <p:toolbar style="height:23px;">  
			    <p:toolbarGroup align="right" style="height:18px;">      
				  <p:menubar align="right" style="height:18px;">        
				      <p:menuitem value="Sair" url="../index.xhtml" icon="ui-icon-close" />  
	  			  </p:menubar>  
	  			  
			    </p:toolbarGroup> 
			    <p:toolbarGroup align="left" style="height:18px;">      
				  <p:menubar align="right" style="height:18px;">        
				      <p:menuitem value="Home" url="locadora.xhtml"  />  
	  			  </p:menubar>  
	  			  
			    </p:toolbarGroup>     
  	   </p:toolbar> 
        <center><h:graphicImage  value="#{resource['img:logograph_banner.png']}" /></center>
  </h:form>
  <h:outputText value="#{userBean.sessionUser}" /> 
    </p:layoutUnit>  
  
   
  
    <p:layoutUnit position="west" size="200" style="border:none;background-color:black;display:none !important;" resizable="true" closable="false" collapsible="false">  
      
    </p:layoutUnit>  
  
    
  
    <p:layoutUnit position="center" style="height:100%;"> 
       
    <p:tabView id="tabView" dynamic="true" cache="true" style="overflow:hidden;min-width:400px;min-height:100%;">  
  
        <p:tab id="tba1" title="Inicial">  
           
                  
               <h:form>  
				    <div id="container">
  <div id="cube" class="animate">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>
  			</h:form>   
           
        </p:tab>  
  
       
  
        <p:tab id="tab2" title="Filmes">  
	        <h:form>
		            <h:panelGrid columns="3" cellpadding="10">  
		               <p:dataGrid var="filme" value="#{filmeBeanTable.filmes}" columns="5"  
		       				 rows="12" paginator="true"  
		        			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
		       				 rowsPerPageTemplate="9,12,15">  
		  
					        <p:panel header="#{filme.title}" style="text-align:center; width:160px;"  >  
					            <h:panelGrid columns="1" style="width:100%">  
					            	 <h:graphicImage style="width:50px;" value="#{resource['img:film.png']}" />
					                <p:commandButton icon="ui-icon ui-icon-search" title="Selecionar cliente"
							           action="sinopse_filme.xhtml" ajax="false" oncomplete="sinopse_filme.xhtml">
							           <f:setPropertyActionListener value="#{filme}" target="#{userBean.movieSelected}"/>
							     </p:commandButton>      
					            </h:panelGrid>  
					        </p:panel> 
					        <p:column style="width: 10px">                              
							                           
							</p:column> 
		    			</p:dataGrid>   
		            
		            </h:panelGrid>  
	            </h:form>
        </p:tab>  
  		 <p:tab id="tab3" title="Atores">  
            <h:panelGrid columns="2" cellpadding="10">  
               
               <p:dataGrid var="ator" value="#{actorBeanTable.atores}" columns="9"  
        			rows="12" paginator="true"  
        			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
        			rowsPerPageTemplate="9,12,15">  
  
			        <p:panel header="#{ator.name}" style="text-align:center; width:100%;"  >  
			            <h:panelGrid columns="1" style="width:100%">  
			               <h:graphicImage style="width:40%;" value="#{resource['img:imageAvatarAnonimo.jpg']}" />
			            </h:panelGrid>  
			        </p:panel>  
    			</p:dataGrid>     
            </h:panelGrid>  
        </p:tab>  
        <p:tab id="tab4" title="Diretores">  
            <h:panelGrid columns="2" cellpadding="10">  
               
               <p:dataGrid var="ator" value="#{directorBeanTable.diretores}" columns="9"  
        			rows="12" paginator="true"  
        			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
        			rowsPerPageTemplate="9,12,15">  
  
			        <p:panel header="#{ator.name}" style="text-align:center; width:100%;"  >  
			            <h:panelGrid columns="1" style="width:100%">  
			                 <h:graphicImage style="width:60%;" value="#{resource['img:director2.png']}" />
			            </h:panelGrid>  
			        </p:panel>  
    			</p:dataGrid>     
            </h:panelGrid>  
        </p:tab>
        <p:tab id="tab5" title="Alugados">  
	       
		            <h:panelGrid columns="3" cellpadding="5">  
		               <p:dataGrid var="filme" value="#{filmeBeanTable.filmes}" columns="5"  
		       				 rows="10" paginator="true"  
		        			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
		       				 rowsPerPageTemplate="9,12,15">  
		   			<h:form id="form1">
					        <p:panel header="#{filme.title}" style="text-align:center; width:100%;"  >  
		   						<h:inputHidden value="#{filme.title}" />
					            <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">  
  
						       
						        <p:selectOneRadio style="width:10px !important;" id="options" value="#{userBean.note}">  
						            <f:selectItem style="width:10px !important;" itemLabel="1" itemValue="1" />  
						            <f:selectItem itemLabel="2" itemValue="2" />  
						            <f:selectItem itemLabel="3" itemValue="3" /> 
						            <f:selectItem itemLabel="4" itemValue="4" />  
						            <f:selectItem itemLabel="5" itemValue="5" /> 
						                
						        </p:selectOneRadio><p:commandButton style="display:none;"></p:commandButton>
						        <p:commandButton icon="ui-icon ui-icon-search" id="submitButton" actionListener="#{userBean.voto}" value="Vote" ajax="false">
						        	 
						        	 <f:param name="tituloFilme" value="#{filme.title}" />
						        </p:commandButton>  
    
						    </h:panelGrid>  
					        </p:panel> 
	            </h:form>
					        <p:column style="width: 10px">                              
							                           
							</p:column> 
		    			</p:dataGrid>   
		            
		            </h:panelGrid>  
        </p:tab>  
        <p:tab id="tab6" title="Recomendações">  
            <h:panelGrid columns="2" cellpadding="10">  
               
               <p:dataGrid var="ator" value="#{filmeBeanTable.filmes}" columns="9"  
        			rows="12" paginator="true"  
        			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
        			rowsPerPageTemplate="9,12,15">  
  
			        <p:panel header="#{ator.title}" style="text-align:center; width:100%;"  >  
			            <h:panelGrid columns="1" style="width:100%">  
			                Recomendado
			            </h:panelGrid>  
			        </p:panel>  
    			</p:dataGrid>     
            </h:panelGrid>  
        </p:tab>    
    </p:tabView>  
 
                      
     
   
  
   
    </p:layoutUnit>  
  
</p:layout>  
                              
    </h:body>  
</html>  